
//自定义颜色示例
 mui("#demo5 .mui-progressbar").each(function () {
	mui(this).progressbar({progress:this.getAttribute("data-progress")}).show();
});

/*栏目添加*/
var btnShow = document.getElementById('JSclickShow');
var pupMain = document.getElementById("pupMain");
//监听点击事件
btnShow.addEventListener("tap",function () {
	if(pupMain.style.display=='block'){  
		pupMain.style.display='none'; 
		btnShow.children[0].className = 'icon-add';
		pupMain.className = 'sy-pup-main';
	}else{  
		pupMain.style.display='block'; 
		btnShow.children[0].className += ' icon-add-sss';
		pupMain.className += ' sy-pup-animation';
	} 
});

//路由跳转
mui('#example-demo2').on('tap', '.mui-table-view-cell', function(e){
  //打开关于页面
  mui.openWindow({
    url: '习惯详情.html', 
    id:'习惯详情.html',
    show: {  
        autoShow: true, //页面loaded事件发生后自动显示，默认为true  
        aniShow: 'slide-in-right', //页面显示动画，默认为”slide-in-right“；  
        duration: 500 //页面动画持续时间，Android平台默认100毫秒，iOS平台默认200毫秒；  
    },  
    waiting: {  
        autoShow: true, //自动显示等待框，默认为true  
        title: '正在加载...', //等待对话框上显示的提示内容  
        options: {  
        }  
    } 
  });
});

mui('nav.mui-bar-tab').on('tap', 'a.mui-tab-item:nth-child(1)', function(e){
  mui.openWindow({
    url: 'index.html', 
    id:'xiangqing'
  });
});
mui('nav.mui-bar-tab').on('tap', 'a.mui-tab-item:nth-child(2)', function(e){
  mui.openWindow({
    url: '作业.html', 
    id:'xiangqing'
  });
});
mui('nav.mui-bar-tab').on('tap', 'a.mui-tab-item:nth-child(4)', function(e){
  mui.openWindow({
    url: '3-1-发现.html', 
    id:'xiangqing'
  });
});
mui('nav.mui-bar-tab').on('tap', 'a.mui-tab-item:nth-child(5)', function(e){
  mui.openWindow({
    url: '我的.html', 
    id:'xiangqing',
    styles:{
    	background:"#000"
    }
  });
});
mui('#pupMain>.mui-bar-tab').on('tap', 'a.mui-tab-item:nth-child(1)', function(e){
  mui.openWindow({
    url: '添加习惯.html', 
    id:'xiangqing'
  });
});
mui('#pupMain>.mui-bar-tab').on('tap', 'a.mui-tab-item:nth-child(2)', function(e){
  mui.openWindow({
    url: '添加作业.html', 
    id:'xiangqing'
  });
});

mui('#example-jinri').on('tap', '.mui-table-view-cell', function(e){
	mui.openWindow({
		url: '2-1-3-作业详情.html'
	})
});

mui('#example-jiangli').on('tap', '.mui-table-view-cell', function(e){
	mui.openWindow({
		url: '1-2-2-习惯奖励详情设置.html'
	})
});


mui('body').on('tap','#MySet', function(e){
	mui.openWindow({
		url: '4-3-我的设置.html'
	})
});



